package com.fulu.netty.luban.thirddemo;

import io.netty.channel.*;
import io.netty.util.concurrent.EventExecutorGroup;

/**
 * 客户端处理类
 */
public class TestClientHandler extends SimpleChannelInboundHandler<String> {
    @Override
    protected void messageReceived(ChannelHandlerContext ctx, String msg) throws Exception {
        System.out.println(msg.trim() + "\n");
    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        cause.printStackTrace();
        ctx.close();
    }
}
